import { request } from "@umijs/max";



/**  获取人脸库列表 */
export async function faceLibraryList(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.filesList[]>>('/face-library', {
    method: 'POST',
    data:options
  });
}

/**   添加人脸到人脸库 */
export async function saveFaceLibrary(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<ProcessingData.filesList[]>>('/face-library/upload', {
    method: 'POST',
    data:options,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  });
}

/** 删除人脸 DELETE */
export async function deleteFacec(id:number) {
  return request<BaseResponseBean.responsePage<ProcessingData.faces[]>>(`/face-library/${id}`, {
    method: 'DELETE',
  });
}


/** 删除人脸 DELETE */
export async function getFaceDetail(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.faces[]>>(`/face-library/detail`, {
    method: 'POST',
    data:options,
  });
}

/**   添加人脸到人脸库 */
export async function updateMatches(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<ProcessingData.filesList[]>>('/face-library/update-matches', {
    method: 'POST',
    data:options,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  });
}
